home *** CD-ROM | disk | FTP | other *** search
- /*
- SVEditUtils.h
-
- Version 3.0d7
-
- Copyright © Apple Computer UK Ltd. 1991,1992
-
- All rights reserved.
-
- Produced by : UK Developer Technical Support
- AppleLink : UK.DTS
- */
-
-
- #ifndef __SVEDITUTILS__
- #define __SVEDITUTILS__
-
- /**
- This example is brought to you for the purposes of exploration and experimentation of
- System 7.0. It is not intended to form the basis of your own programs - but try out the code-
- that's what it's there for
- **/
-
- /**
- System 7.0 specifics-:
-
- We check the configuration on startup to see if we are running on a pre-7.0
- machine. Actually we specifically check for the features of 7.0 which we need.
- If the required features are absent CheckEnvironment will fail.
-
- GetTempFileName is borrowed from MacApp, to generate a unique file name based
- on the date and time. Used when saving via a temporary file
-
- New for 3.0d2:
-
- 19-Feb-92 : NH : Grey Page Setup when no window
- 27-Feb-92 : NH : Remove test menu, gCurrSection
- 18-Mar-92 : NH : Add GreaterOf
- Change DrawDefaultOutline
- Comments added
- 27-Mar-92 : NH : Arrow cursor before alerts
-
- New for 3.0d4:
-
- 5-Aug-92 : NH : Added GetRectOfDialogItem, CtrlKeyPressed,OptionKeyPressed
- **/
-
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Packages.h>
- #include <GestaltEqu.h>
- #include <Editions.h>
- #include <Printing.h>
-
- #ifndef __SVEDITGLOBALS__
- #include "SVEditGlobals.h"
- #endif
-
- pascal Boolean GestaltAvailable();
-
- pascal Boolean CheckEnvironment();
-
- pascal void ShowError(Str255 theError,
- long theErrorCode);
-
- pascal Boolean FeatureIsImplemented(OSType theFeature,
- short theTestBit);
-
- pascal void GetTempFileName(DPtr aDoc,
- Str255 newString);
-
- pascal Boolean Ours(WindowPtr aWindow);
-
- pascal void SetShortMenus();
-
- pascal void SetLongMenus();
-
- pascal void SetStyleMenu(DPtr theDoc);
-
- pascal void SetFontMenu(DPtr theDoc);
-
- pascal void SetEditMenu(DPtr theDoc);
-
- pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
-
- pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
-
- pascal void RetrieveText(DialogPtr aDialog,
- short anItem,
- Str255 aString);
-
- pascal void SetText( DialogPtr aDialog,
- short itemNo,
- Str255 theString);
-
- pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
-
- /*changed for 7.0 and Outline Fonts*/
-
- pascal void SetSizeMenu(DPtr theDoc);
-
- pascal long LesserOf(long A, long B);
-
- pascal long GreaterOf(long A, long B);
-
- pascal Boolean DoPageSetup(DPtr theDoc);
-
- pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
-
- pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
-
- #endif
-